package aga.sokoban.model;

public enum CellKind {
	Space(' '), Wall('#'), Box('$'), Store('.'), Mover('@'), BoxInStore('*'), MoverInStore('+');
	
	private final char symbol;
	public char getSymbol() {
		return symbol;
	}
	
	CellKind(char symbol) {
		this.symbol = symbol;
	}

	public static CellKind fromChar(char symbol) {
		for(CellKind c : CellKind.values()) {
			if (c.symbol == symbol)
				return c;
		}
		throw new RuntimeException("Unknown symbol: " + symbol);
	}
}
